
package std.unittest
import std.collection.ArrayList

import std.unittest.diff.AssertPrintable
import std.unittest.common.*
import std.time.DateTime
import std.unittest.common.PrettyText
import std.collection.*
import std.math.abs
import std.runtime.ProcessorInfo
import std.random.Random
import std.unittest.common.Color
import std.convert.Formattable
import std.math.*
import std.runtime.GC
import std.sort.*
import std.sync.AtomicOptionReference
import std.process.Process
import std.unicode.*
import std.unittest.prop_test.*
import std.unittest.common.KeyTags
import std.fs.*
import std.process.*
import std.sync.Semaphore
import std.collection.concurrent.ConcurrentLinkedQueue
import std.sync.ReentrantMutex
import std.unittest.common.optionsInfo
import std.unittest.prop_test.RandomSource
import std.math.round
import std.regex.Regex
import std.convert.Parsable
public import std.unittest.common.Configuration
public import std.unittest.common.ConfigurationKey
public import std.unittest.common.DataProvider
public import std.unittest.common.DataStrategy
public import std.unittest.common.DataShrinker
public import std.unittest.common.registerOptionValidator
public import std.unittest.common.setOptionInfo
public import std.unittest.common.OptionValidity
public import std.unittest.common.KeyFor
public import std.unittest.common.KeyTags
public import std.unittest.prop_test.Arbitrary
public import std.unittest.prop_test.Shrink
public import std.unittest.prop_test.random
public import std.unittest.prop_test.KeyRandom
import std.unittest.mock.PrettyException
import std.fs.Path
import std.unittest.common.PrettyPrinter
import std.collection.concurrent.NonBlockingQueue
import std.env.atExit
import std.sync.AtomicBool
import std.time.MonoTime
import std.time.*
import std.sort.SortExtension
import std.sync.*
import std.unittest.common.DataStrategy
import std.unittest.prop_test.ShrinkHelpers
import std.unittest.common.toStringOrPlaceholder
import std.unittest.mock.*
import std.collection.concurrent.LinkedBlockingQueue
import std.env.exit
import std.env.getTempDirectory
import std.binary.BigEndianOrder
import std.io.IOException
import std.net.*
import std.core.println as corePrintln
import std.core.print as corePrint

@!APILevel[
    since: "22"
]
public class TestSuite {
    @!APILevel[
        since: "22"
    ]
    public prop name: String
    
    /**
    * @throws MockFrameworkInternalError
    * @throws EnvException
    * @throws ExpectationFailedException
    * @throws RegexException
    * @throws JsonException
    * @throws AssertException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws OverflowException
    * @throws ArithmeticException
    * @throws InvalidDataException
    * @throws OutOfMemoryError
    * @throws MockFrameworkException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws IllegalSynchronizationStateException
    * @throws UnittestOptionValidationException
    * @throws getOrFail
    * @throws IllegalMemoryException
    * @throws IllegalArgumentException
    * @throws SocketException
    * @throws IllegalFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func runTests(): TestReport
    
    /**
    * @throws MockFrameworkInternalError
    * @throws EnvException
    * @throws ExpectationFailedException
    * @throws RegexException
    * @throws JsonException
    * @throws AssertException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws OverflowException
    * @throws ArithmeticException
    * @throws InvalidDataException
    * @throws OutOfMemoryError
    * @throws MockFrameworkException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws IllegalSynchronizationStateException
    * @throws UnittestOptionValidationException
    * @throws getOrFail
    * @throws IllegalMemoryException
    * @throws IllegalArgumentException
    * @throws SocketException
    * @throws IllegalFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func runTests(configuration: Configuration): TestReport
    
    /**
    * @throws MockFrameworkInternalError
    * @throws EnvException
    * @throws ExpectationFailedException
    * @throws RegexException
    * @throws JsonException
    * @throws AssertException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws OverflowException
    * @throws ArithmeticException
    * @throws InvalidDataException
    * @throws OutOfMemoryError
    * @throws MockFrameworkException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws IllegalSynchronizationStateException
    * @throws UnittestOptionValidationException
    * @throws getOrFail
    * @throws IllegalMemoryException
    * @throws IllegalArgumentException
    * @throws SocketException
    * @throws IllegalFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func runBenchmarks(): BenchReport
    
    /**
    * @throws MockFrameworkInternalError
    * @throws EnvException
    * @throws ExpectationFailedException
    * @throws RegexException
    * @throws JsonException
    * @throws AssertException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws OverflowException
    * @throws ArithmeticException
    * @throws InvalidDataException
    * @throws OutOfMemoryError
    * @throws MockFrameworkException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws IllegalSynchronizationStateException
    * @throws UnittestOptionValidationException
    * @throws getOrFail
    * @throws IllegalMemoryException
    * @throws IllegalArgumentException
    * @throws SocketException
    * @throws IllegalFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func runBenchmarks(configuration: Configuration): BenchReport
    
    @!APILevel[
        since: "22"
    ]
    public static func builder(name: String): TestSuiteBuilder
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func builder(suite: TestSuite): TestSuiteBuilder
}

@!APILevel[
    since: "22"
]
public class TestGroup {
    @!APILevel[
        since: "22"
    ]
    public prop name: String
    
    /**
    * @throws MockFrameworkInternalError
    * @throws EnvException
    * @throws ExpectationFailedException
    * @throws RegexException
    * @throws JsonException
    * @throws AssertException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws OverflowException
    * @throws ArithmeticException
    * @throws InvalidDataException
    * @throws OutOfMemoryError
    * @throws MockFrameworkException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws IllegalSynchronizationStateException
    * @throws UnittestOptionValidationException
    * @throws getOrFail
    * @throws IllegalMemoryException
    * @throws IllegalArgumentException
    * @throws SocketException
    * @throws IllegalFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func runTests(): TestReport
    
    /**
    * @throws MockFrameworkInternalError
    * @throws EnvException
    * @throws ExpectationFailedException
    * @throws RegexException
    * @throws JsonException
    * @throws AssertException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws OverflowException
    * @throws ArithmeticException
    * @throws InvalidDataException
    * @throws OutOfMemoryError
    * @throws MockFrameworkException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws IllegalSynchronizationStateException
    * @throws UnittestOptionValidationException
    * @throws getOrFail
    * @throws IllegalMemoryException
    * @throws IllegalArgumentException
    * @throws SocketException
    * @throws IllegalFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func runTests(configuration: Configuration): TestReport
    
    /**
    * @throws MockFrameworkInternalError
    * @throws EnvException
    * @throws ExpectationFailedException
    * @throws RegexException
    * @throws JsonException
    * @throws AssertException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws OverflowException
    * @throws ArithmeticException
    * @throws InvalidDataException
    * @throws OutOfMemoryError
    * @throws MockFrameworkException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws IllegalSynchronizationStateException
    * @throws UnittestOptionValidationException
    * @throws getOrFail
    * @throws IllegalMemoryException
    * @throws IllegalArgumentException
    * @throws SocketException
    * @throws IllegalFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func runBenchmarks(): BenchReport
    
    /**
    * @throws MockFrameworkInternalError
    * @throws EnvException
    * @throws ExpectationFailedException
    * @throws RegexException
    * @throws JsonException
    * @throws AssertException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws OverflowException
    * @throws ArithmeticException
    * @throws InvalidDataException
    * @throws OutOfMemoryError
    * @throws MockFrameworkException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws IllegalSynchronizationStateException
    * @throws UnittestOptionValidationException
    * @throws getOrFail
    * @throws IllegalMemoryException
    * @throws IllegalArgumentException
    * @throws SocketException
    * @throws IllegalFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func runBenchmarks(configuration: Configuration): BenchReport
    
    @!APILevel[
        since: "22"
    ]
    public static func builder(name: String): TestGroupBuilder
    
    @!APILevel[
        since: "22"
    ]
    public static func builder(group: TestGroup): TestGroupBuilder
}

@!APILevel[
    since: "22"
]
public class TestGroupBuilder {
    @!APILevel[
        since: "22"
    ]
    public func setName(name: String): TestGroupBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func configure(configuration: Configuration): TestGroupBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func add(test: UnitTestCase): TestGroupBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func add(benchmark: Benchmark): TestGroupBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func add(suite: TestSuite): TestGroupBuilder
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func build(): TestGroup
}

@!APILevel[
    since: "22"
]
public class TestSuiteBuilder {
    @!APILevel[
        since: "22"
    ]
    public func setName(name: String): TestSuiteBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func configure(configuration: Configuration): TestSuiteBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func beforeEach(body: (String) -> Unit): TestSuiteBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func afterEach(body: (String) -> Unit): TestSuiteBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func beforeEach(body: () -> Unit): TestSuiteBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func afterEach(body: () -> Unit): TestSuiteBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func beforeAll(body: () -> Unit): TestSuiteBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func afterAll(body: () -> Unit): TestSuiteBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func add(test: UnitTestCase): TestSuiteBuilder
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func add(benchmark: Benchmark): TestSuiteBuilder
    
    @!APILevel[
        since: "22"
    ]
    public func template(template: TestSuite): TestSuiteBuilder
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func build(): TestSuite
}

@!APILevel[
    since: "22"
]
public class UnitTestCase {
    @!APILevel[
        since: "22"
    ]
    public prop name: String
    
    /**
    * @throws MockFrameworkInternalError
    * @throws EnvException
    * @throws ExpectationFailedException
    * @throws RegexException
    * @throws JsonException
    * @throws AssertException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws OverflowException
    * @throws ArithmeticException
    * @throws InvalidDataException
    * @throws OutOfMemoryError
    * @throws MockFrameworkException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws IllegalSynchronizationStateException
    * @throws UnittestOptionValidationException
    * @throws getOrFail
    * @throws IllegalMemoryException
    * @throws IllegalArgumentException
    * @throws SocketException
    * @throws IllegalFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func run(): TestReport
    
    @!APILevel[
        since: "22"
    ]
    public static func createParameterized<T>(name: String, strategy: DataStrategy<T>,
        configuration!: Configuration = Configuration(), body!: (T) -> Unit): UnitTestCase
    
    @!APILevel[
        since: "22"
    ]
    public static func createParameterized<T>(name: String, strategy: DataStrategyProcessor<T>,
        configuration!: Configuration = Configuration(), body!: (T) -> Unit): UnitTestCase
    
    @!APILevel[
        since: "22"
    ]
    public static func create(name: String, configuration!: Configuration = Configuration(), body!: () -> Unit): UnitTestCase
}

@!APILevel[
    since: "22"
]
public class Benchmark {
    @!APILevel[
        since: "22"
    ]
    public prop name: String
    
    /**
    * @throws MockFrameworkInternalError
    * @throws EnvException
    * @throws ExpectationFailedException
    * @throws RegexException
    * @throws JsonException
    * @throws AssertException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws OverflowException
    * @throws ArithmeticException
    * @throws InvalidDataException
    * @throws OutOfMemoryError
    * @throws MockFrameworkException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws IllegalSynchronizationStateException
    * @throws UnittestOptionValidationException
    * @throws getOrFail
    * @throws IllegalMemoryException
    * @throws IllegalArgumentException
    * @throws SocketException
    * @throws IllegalFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func run(): BenchReport
    
    /**
    * @throws IllegalArgumentException
    * @throws UnittestOptionValidationException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func createParameterized<T>(
        name: String,
        strategy: DataStrategy<T>,
        configuration!: Configuration = Configuration(),
        measurement!: Measurement = TimeNow(),
        body!: (T) -> Unit
    ): Benchmark
    
    /**
    * @throws IllegalArgumentException
    * @throws UnittestOptionValidationException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func createParameterized<T>(
        name: String,
        strategy: DataStrategyProcessor<T>,
        configuration!: Configuration = Configuration(),
        measurement!: Measurement = TimeNow(),
        body!: (T) -> Unit
    ): Benchmark
    
    /**
    * @throws IllegalArgumentException
    * @throws UnittestOptionValidationException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func create(
        name: String,
        configuration!: Configuration = Configuration(),
        measurement!: Measurement = TimeNow(),
        body!: () -> Unit
    ): Benchmark
}

@!APILevel[
    since: "22"
]
public struct TestCaseInfo {
}

@!APILevel[
    since: "22"
]
sealed abstract class Report {
    @!APILevel[
        since: "22"
    ]
    public prop errorCount:   Int64
    
    @!APILevel[
        since: "22"
    ]
    public prop caseCount:    Int64
    
    @!APILevel[
        since: "22"
    ]
    public prop passedCount:  Int64
    
    @!APILevel[
        since: "22"
    ]
    public prop failedCount:  Int64
    
    @!APILevel[
        since: "22"
    ]
    public prop skippedCount: Int64
}

@!APILevel[
    since: "22"
]
public class TestReport <: Report {
    /**
    * @throws InvalidDataException
    * @throws OutOfMemoryError
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws ArithmeticException
    * @throws FSException
    * @throws IllegalMemoryException
    * @throws Exception
    * @throws NoneValueException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func reportTo<T>(reporter: Reporter<TestReport, T>): T
}

@!APILevel[
    since: "22"
]
public class BenchReport <: Report {
    /**
    * @throws OverflowException
    * @throws InvalidDataException
    * @throws IllegalMemoryException
    * @throws IndexOutOfBoundsException
    * @throws NoneValueException
    * @throws IllegalArgumentException
    * @throws RegexException
    * @throws ConcurrentModificationException
    * @throws JsonException
    * @throws FSException
    * @throws Exception
    * @throws ProcessException
    * @throws ArithmeticException
    * @throws OutOfMemoryError
    * @throws TimeoutException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func reportTo<T>(reporter: Reporter<BenchReport, T>): T
}

@!APILevel[
    since: "22"
]
public interface TestClass {
    @!APILevel[
        since: "22"
    ]
    func asTestSuite(): TestSuite
}

@!APILevel[
    since: "22"
]
public class TestPackage {
    @!APILevel[
        since: "22"
    ]
    public TestPackage(
        let name: String
    )
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func registerCase(testCase: () -> UnitTestCase): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func registerSuite(suite: () -> TestSuite): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func registerBench(bench: () -> Benchmark): Unit
}



/**
* @throws Error
* @throws UnittestTimeoutException
* @throws IllegalSynchronizationStateException
* @throws IllegalArgumentException
* @throws IndexOutOfBoundsException
* @throws AssertException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func assertEqual<T>(
    leftStr: String,
    rightStr: String,
    expected: T,
    actual: T,
    optParentCtx!: ?AssertionCtx = None
): Unit where T <: Equatable<T>

/**
* @throws Error
* @throws UnittestTimeoutException
* @throws IllegalSynchronizationStateException
* @throws IllegalArgumentException
* @throws IndexOutOfBoundsException
* @throws AssertException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func assertEqual<T>(
    leftStr: String,
    rightStr: String,
    expected: T,
    actual: T,
    isDelta!: Bool,
    optParentCtx!: ?AssertionCtx = None
): Unit where T <: Equatable<T>

/**
* @throws Error
* @throws UnittestTimeoutException
* @throws IllegalSynchronizationStateException
* @throws IllegalArgumentException
* @throws IndexOutOfBoundsException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func expectEqual<T>(
    leftStr: String,
    rightStr: String,
    expected: T,
    actual: T,
    optParentCtx!: ?AssertionCtx = None
): Unit where T <: Equatable<T>

/**
* @throws Error
* @throws UnittestTimeoutException
* @throws IllegalSynchronizationStateException
* @throws IllegalArgumentException
* @throws IndexOutOfBoundsException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func expectEqual<T>(
    leftStr: String,
    rightStr: String,
    expected: T,
    actual: T,
    isDelta!: Bool,
    optParentCtx!: ?AssertionCtx = None
): Unit where T <: Equatable<T>

@!APILevel[
    since: "22"
]
public class AssertException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public class AssertIntermediateException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public let expression: String
    
    @!APILevel[
        since: "22"
    ]
    public let originalException: Exception
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func getOriginalStackTrace(): String
}

@!APILevel[
    since: "22"
]
public interface BenchmarkInputMarker {
}

@!APILevel[
    since: "22"
]
public interface BenchInputProvider<T> <: BenchmarkInputMarker {
    @Frozen
    @!APILevel[
        since: "22"
    ]
    mut func reset(max: Int64)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    mut func get(idx: Int64): T
}

@!APILevel[
    since: "22"
]
public struct ImmutableInputProvider<T> <: BenchInputProvider<T> {
    @!APILevel[
        since: "22"
    ]
    public ImmutableInputProvider(let data: T)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public mut func get(_: Int64): T
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public static func createOrExisting(arg: T, x!: Int64 = 0): ImmutableInputProvider<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public static func createOrExisting<U>(arg: U): U where U <: BenchInputProvider<T>
}

@!APILevel[
    since: "22"
]
public struct BatchInputProvider<T> <: BenchInputProvider<T> {
    @!APILevel[
        since: "22"
    ]
    public BatchInputProvider(let builder: () -> T)
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public mut func reset(max: Int64)
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public mut func get(idx: Int64): T
}

@!APILevel[
    since: "22"
]
public struct BatchSizeOneInputProvider<T> <: BenchInputProvider<T> {
    @!APILevel[
        since: "22"
    ]
    public BatchSizeOneInputProvider(let builder: () -> T)
    
    /**
    * @throws IllegalStateException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public mut func reset(max: Int64)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public mut func get(_: Int64): T
}

@!APILevel[
    since: "22"
]
public struct GenerateEachInputProvider<T> <: BenchInputProvider<T> {
    @!APILevel[
        since: "22"
    ]
    public GenerateEachInputProvider(let builder: () -> T)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public mut func reset(_: Int64)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public mut func get(_: Int64): T
}

@!APILevel[
    since: "22"
]
public interface BenchmarkConfig {
    @!APILevel[
        since: "22"
    ]
    func batchSize(b: Int64): Unit
    
    @!APILevel[
        since: "22"
    ]
    func batchSize(x: Range<Int64>): Unit
    
    @!APILevel[
        since: "22"
    ]
    func warmup(x: Int64): Unit
    
    @!APILevel[
        since: "22"
    ]
    func warmup(x: Duration): Unit
    
    @!APILevel[
        since: "22"
    ]
    func minDuration(x: Duration): Unit
    
    @!APILevel[
        since: "22"
    ]
    func explicitGC(x: ExplicitGcType): Unit
    
    @!APILevel[
        since: "22"
    ]
    func minBatches(x: Int64): Unit
}

extend Configuration <: BenchmarkConfig {
    /**
    * @throws UnittestOptionValidationException
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func batchSize(b: Int64)
    
    /**
    * @throws UnittestOptionValidationException
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func batchSize(x: Range<Int64>)
    
    /**
    * @throws IllegalArgumentException
    * @throws UnittestOptionValidationException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func warmup(x: Int64)
    
    /**
    * @throws IllegalArgumentException
    * @throws UnittestOptionValidationException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func warmup(x: Duration)
    
    /**
    * @throws IllegalArgumentException
    * @throws UnittestOptionValidationException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func minDuration(x: Duration)
    
    /**
    * @throws IllegalArgumentException
    * @throws UnittestOptionValidationException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func explicitGC(x: ExplicitGcType)
    
    /**
    * @throws IllegalArgumentException
    * @throws UnittestOptionValidationException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func minBatches(x: Int64)
}



@!APILevel[
    since: "22"
]
public interface Measurement {
    @!APILevel[
        since: "22"
    ]
    func setup()
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    func measure(): Float64
    
    @!APILevel[
        since: "22"
    ]
    prop conversionTable: MeasurementUnitTable
    
    @!APILevel[
        since: "22"
    ]
    prop name: String
    
    @!APILevel[
        since: "22"
    ]
    prop textDescription: String
    
    @!APILevel[
        since: "22"
    ]
    prop info: MeasurementInfo
}

@!APILevel[
    since: "22"
]
public struct MeasurementInfo {
}

@!APILevel[
    since: "22"
]
public type MeasurementUnitTable = Array<(Float64, String)>


@!APILevel[
    since: "22"
]
public struct TimeNow <: Measurement {
    @!APILevel[
        since: "22"
    ]
    public init(unit: ?TimeUnit)
    
    @!APILevel[
        since: "22"
    ]
    public init()
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws ArithmeticException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func measure(): Float64
    
    @!APILevel[
        since: "22"
    ]
    public prop conversionTable: MeasurementUnitTable
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
    
    @!APILevel[
        since: "22"
    ]
    public prop textDescription: String
}

@!APILevel[
    since: "22"
]
public enum TimeUnit <: ToString {
    @!APILevel[
        since: "22"
    ]
    Nanos |
    @!APILevel[
        since: "22"
    ]
    Micros |
    @!APILevel[
        since: "22"
    ]
    Millis |
    @!APILevel[
        since: "22"
    ]
    Seconds
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
}

@!APILevel[
    since: "22"
]
public enum ExplicitGcType <: ToString {
    @!APILevel[
        since: "22"
    ]
    Disabled |
    @!APILevel[
        since: "22"
    ]
    Light |
    @!APILevel[
        since: "22"
    ]
    Heavy
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
}

@!APILevel[
    since: "22"
]
public struct CpuCycles <: Measurement {
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func measure(): Float64
    
    @!APILevel[
        since: "22"
    ]
    public func setup()
    
    @!APILevel[
        since: "22"
    ]
    public prop conversionTable: MeasurementUnitTable
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
    
    @!APILevel[
        since: "22"
    ]
    public prop textDescription: String
}

@!APILevel[
    since: "22"
]
public struct Perf <: Measurement {
    @!APILevel[
        since: "22"
    ]
    public Perf(var counter: PerfCounter)
    
    @!APILevel[
        since: "22"
    ]
    public init()
    
    /**
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func setup()
    
    /**
    * @throws Exception
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func measure(): Float64
    
    @!APILevel[
        since: "22"
    ]
    public prop conversionTable: MeasurementUnitTable
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public prop textDescription: String
}

@!APILevel[
    since: "22"
]
public enum PerfCounter <: ToString {
    @!APILevel[
        since: "22"
    ]
    HW_CPU_CYCLES |
    @!APILevel[
        since: "22"
    ]
    HW_INSTRUCTIONS |
    @!APILevel[
        since: "22"
    ]
    HW_CACHE_REFERENCES |
    @!APILevel[
        since: "22"
    ]
    HW_CACHE_MISSES |
    @!APILevel[
        since: "22"
    ]
    HW_BRANCH_INSTRUCTIONS |
    @!APILevel[
        since: "22"
    ]
    HW_BRANCH_MISSES |
    @!APILevel[
        since: "22"
    ]
    HW_BUS_CYCLES |
    @!APILevel[
        since: "22"
    ]
    HW_STALLED_CYCLES_FRONTEND |
    @!APILevel[
        since: "22"
    ]
    HW_STALLED_CYCLES_BACKEND |
    @!APILevel[
        since: "22"
    ]
    HW_REF_CPU_CYCLES |
    @!APILevel[
        since: "22"
    ]
    SW_CPU_CLOCK |
    @!APILevel[
        since: "22"
    ]
    SW_TASK_CLOCK |
    @!APILevel[
        since: "22"
    ]
    SW_PAGE_FAULTS |
    @!APILevel[
        since: "22"
    ]
    SW_CONTEXT_SWITCHES |
    @!APILevel[
        since: "22"
    ]
    SW_CPU_MIGRATIONS |
    @!APILevel[
        since: "22"
    ]
    SW_PAGE_FAULTS_MIN |
    @!APILevel[
        since: "22"
    ]
    SW_PAGE_FAULTS_MAJ |
    @!APILevel[
        since: "22"
    ]
    SW_EMULATION_FAULTS
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
}

@!APILevel[
    since: "22"
]
public class AssertionCtx {
    @!APILevel[
        since: "22"
    ]
    public prop caller: String
    
    @!APILevel[
        since: "22"
    ]
    public prop hasErrors: Bool
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws NoneValueException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func arg(key: String): String
    
    @!APILevel[
        since: "22"
    ]
    public prop args: String
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func setArgsAliases(aliases: Array<String>)
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws AssertException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func fail(message: String): Nothing
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws AssertException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func fail<PP>(pt: PP): Nothing where PP <: PrettyPrintable
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func failExpect(message: String): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func failExpect<PP>(pt: PP): Unit where PP <: PrettyPrintable
}

/**
* @throws Error
* @throws UnittestTimeoutException
* @throws IllegalSynchronizationStateException
* @throws IllegalArgumentException
* @throws IndexOutOfBoundsException
* @throws AssertException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func invokeCustomAssert<T>(
    passedArgs: Array<String>,
    caller: String,
    assert: (AssertionCtx) -> T,
    optParentCtx!: ?AssertionCtx = None
): T

/**
* @throws Error
* @throws UnittestTimeoutException
* @throws IllegalSynchronizationStateException
* @throws IllegalArgumentException
* @throws IndexOutOfBoundsException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func invokeCustomExpect(
    passedArgs: Array<String>,
    caller: String,
    expect: (AssertionCtx) -> Any,
    optParentCtx!: ?AssertionCtx = None
): Unit

/**
* @throws IllegalMemoryException
* @throws Exception
* @throws UnittestCliOptionsFormatException
* @throws getOrThrow
* @throws JsonException
* @throws OutOfMemoryError
* @throws IllegalArgumentException
* @throws RegexException
* @throws UnittestOptionValidationException
* @throws IndexOutOfBoundsException
* @throws ArithmeticException
* @throws ProcessException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func defaultConfiguration(): Configuration


@!APILevel[
    since: "22"
]
public interface NearEquatable<CT, D> {
    @!APILevel[
        since: "22"
    ]
    func isNear(obj: CT, delta!: D): Bool
}

@!APILevel[
    since: "22"
]
public struct RelativeDelta<T> {
    @!APILevel[
        since: "22"
    ]
    public RelativeDelta(let absolute!: T, let relative!: T)
}

/**
* @throws IllegalArgumentException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func isNearExpansion<CT, D>(l: CT, r: CT, delta!: D, cmpType!: String): Bool where CT <: NearEquatable<CT, D> & Comparable<CT>

/**
* @throws IllegalArgumentException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func isNearExpansion<CT, D>(l: CT, r: CT, delta!: D, cmpType!: String, overloadHack!: Bool = true): Bool where CT <: NearEquatable<CT, D>

extend Float16 <: NearEquatable<Float16, Float16> & NearEquatable<Float16, RelativeDelta<Float16>> {
    /**
    * @throws IllegalArgumentException
    * @throws IllegalStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func isNear(obj: Float16, delta!: Float16): Bool
    
    /**
    * @throws IllegalArgumentException
    * @throws IllegalStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func isNear(obj: Float16, delta!: RelativeDelta<Float16>): Bool
}

extend Float32 <: NearEquatable<Float32, Float32> & NearEquatable<Float32, RelativeDelta<Float32>> {
    /**
    * @throws IllegalArgumentException
    * @throws IllegalStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func isNear(obj: Float32, delta!: Float32): Bool
    
    /**
    * @throws IllegalArgumentException
    * @throws IllegalStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func isNear(obj: Float32, delta!: RelativeDelta<Float32>): Bool
}

extend Float64 <: NearEquatable<Float64, Float64> & NearEquatable<Float64, RelativeDelta<Float64>> {
    /**
    * @throws IllegalArgumentException
    * @throws IllegalStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func isNear(obj: Float64, delta!: Float64): Bool
    
    /**
    * @throws IllegalArgumentException
    * @throws IllegalStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func isNear(obj: Float64, delta!: RelativeDelta<Float64>): Bool
}


/**
* @throws IllegalFormatException
* @throws Exception
* @throws UnittestCliOptionsFormatException
* @throws getOrThrow
* @throws MockFrameworkException
* @throws JsonException
* @throws DataModelException
* @throws InvalidDataException
* @throws NoneValueException
* @throws ProcessException
* @throws IllegalSynchronizationStateException
* @throws SocketException
* @throws OutOfMemoryError
* @throws getOrFail
* @throws UnittestOptionValidationException
* @throws IndexOutOfBoundsException
* @throws AssertException
* @throws RegexException
* @throws ConcurrentModificationException
* @throws IllegalMemoryException
* @throws Error
* @throws FSException
* @throws ArithmeticException
* @throws OverflowException
* @throws ExpectationFailedException
* @throws IllegalStateException
* @throws EnvException
* @throws IllegalArgumentException
* @throws TimeoutException
* @throws MockFrameworkInternalError
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func entryMain(testPackage: TestPackage): Int64

/**
* @throws Error
* @throws UnittestTimeoutException
* @throws IllegalSynchronizationStateException
* @throws IllegalArgumentException
* @throws IndexOutOfBoundsException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func failExpect(message: String): Unit

/**
* @throws Error
* @throws UnittestTimeoutException
* @throws IllegalSynchronizationStateException
* @throws IllegalArgumentException
* @throws IndexOutOfBoundsException
* @throws AssertException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func fail(message: String): Nothing

/**
* @throws IllegalArgumentException
* @throws IndexOutOfBoundsException
* @throws IllegalSynchronizationStateException
* @throws AssertException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func assertCaughtUnexpectedE(
    message: String,
    expectedExceptions: String,
    caughtException: String,
    optParentCtx!: ?AssertionCtx = None
): Nothing

/**
* @throws IllegalArgumentException
* @throws IndexOutOfBoundsException
* @throws IllegalSynchronizationStateException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func expectCaughtUnexpectedE(
    message: String,
    expectedExceptions: String,
    caughtException: String,
    optParentCtx!: ?AssertionCtx = None
): Unit


extend UInt8 <: Torcable<UInt8> {
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentEntry(): ?(UInt8, UInt8)
    
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentValueComparedTo(value: UInt8): ?UInt8
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func nextFrom(random: Random): UInt8
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func suggestedFrom(random: Random): UInt8
    
    @!APILevel[
        since: "22"
    ]
    public func isZero()
    
    @!APILevel[
        since: "22"
    ]
    public func bitFlip(at: UInt8): UInt8
}

extend UInt16 <: Torcable<UInt16> {
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentEntry(): ?(UInt16, UInt16)
    
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentValueComparedTo(value: UInt16): ?UInt16
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func nextFrom(random: Random): UInt16
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func suggestedFrom(random: Random): UInt16
    
    @!APILevel[
        since: "22"
    ]
    public func isZero()
    
    @!APILevel[
        since: "22"
    ]
    public func bitFlip(at: UInt8): UInt16
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public operator func+(arg: UInt8): UInt16
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public operator func-(arg: UInt8): UInt16
}

extend UInt32 <: Torcable<UInt32> {
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentEntry(): ?(UInt32, UInt32)
    
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentValueComparedTo(value: UInt32): ?UInt32
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func nextFrom(random: Random): UInt32
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func suggestedFrom(random: Random): UInt32
    
    @!APILevel[
        since: "22"
    ]
    public func isZero()
    
    @!APILevel[
        since: "22"
    ]
    public func bitFlip(at: UInt8): UInt32
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public operator func+(arg: UInt8): UInt32
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public operator func-(arg: UInt8): UInt32
}

extend UInt64 <: Torcable<UInt64> {
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentEntry(): ?(UInt64, UInt64)
    
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentValueComparedTo(value: UInt64): ?UInt64
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func nextFrom(random: Random): UInt64
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func suggestedFrom(random: Random): UInt64
    
    @!APILevel[
        since: "22"
    ]
    public func isZero()
    
    @!APILevel[
        since: "22"
    ]
    public func bitFlip(at: UInt8): UInt64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public operator func+(arg: UInt8): UInt64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public operator func-(arg: UInt8): UInt64
}

extend Float32 <: Torcable<Float32> {
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentEntry(): ?(Float32, Float32)
    
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentValueComparedTo(value: Float32): ?Float32
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func nextFrom(random: Random): Float32
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func suggestedFrom(random: Random): Float32
    
    @!APILevel[
        since: "22"
    ]
    public func isZero()
    
    @!APILevel[
        since: "22"
    ]
    public func bitFlip(at: UInt8): Float32
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public operator func+(arg: UInt8): Float32
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public operator func-(arg: UInt8): Float32
}

extend Float64 <: Torcable<Float64> {
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentEntry(): ?(Float64, Float64)
    
    @!APILevel[
        since: "22"
    ]
    public static func randomRecentValueComparedTo(value: Float64): ?Float64
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func nextFrom(random: Random): Float64
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func suggestedFrom(random: Random): Float64
    
    @!APILevel[
        since: "22"
    ]
    public func isZero()
    
    @!APILevel[
        since: "22"
    ]
    public func bitFlip(at: UInt8): Float64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public operator func+(arg: UInt8): Float64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public operator func-(arg: UInt8): Float64
}

@!APILevel[
    since: "22"
]
public struct KeyHelp <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop help: KeyHelp
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyNoColor <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop noColor: KeyNoColor
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyFromTopLevel <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop fromTopLevel: KeyFromTopLevel
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyRandomSeed <: KeyFor<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static prop randomSeed: KeyRandomSeed
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyWarmup <: KeyFor<Int64> & KeyFor<Duration> {
    @!APILevel[
        since: "22"
    ]
    public static prop warmup: KeyWarmup
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyMinDuration <: KeyFor<Duration> {
    @!APILevel[
        since: "22"
    ]
    public static prop minDuration: KeyMinDuration
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyExplicitGC <: KeyFor<ExplicitGcType> {
    @!APILevel[
        since: "22"
    ]
    public static prop explicitGC: KeyExplicitGC
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyMinBatches <: KeyFor<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static prop minBatches: KeyMinBatches
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyBatchSize <: KeyFor<Int64> & KeyFor<Range<Int64>> {
    @!APILevel[
        since: "22"
    ]
    public static prop batchSize: KeyBatchSize
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyParallel <: KeyFor<Bool> & KeyFor<String> & KeyFor<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static prop parallel: KeyParallel
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyGenerationSteps <: KeyFor<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static prop generationSteps: KeyGenerationSteps
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyReductionSteps <: KeyFor<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static prop reductionSteps: KeyReductionSteps
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeySkip <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop skip: KeySkip
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyCoverageGuided <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop coverageGuided: KeyCoverageGuided
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyCoverageGuidedInitialSeeds <: KeyFor<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static prop coverageGuidedInitialSeeds: KeyCoverageGuidedInitialSeeds
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyCoverageGuidedMaxCandidates <: KeyFor<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static prop coverageGuidedMaxCandidates: KeyCoverageGuidedMaxCandidates
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyCoverageGuidedBaselineScore <: KeyFor<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static prop coverageGuidedBaselineScore: KeyCoverageGuidedBaselineScore
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyCoverageGuidedNewCoverageScore <: KeyFor<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static prop coverageGuidedNewCoverageScore: KeyCoverageGuidedNewCoverageScore
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyCoverageGuidedNewCoverageBonus <: KeyFor<Int64> {
    @!APILevel[
        since: "22"
    ]
    public static prop coverageGuidedNewCoverageBonus: KeyCoverageGuidedNewCoverageBonus
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyBench <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop bench: KeyBench
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyTimeout <: KeyFor<Duration> {
    @!APILevel[
        since: "22"
    ]
    public static prop timeout: KeyTimeout
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyTimeoutEach <: KeyFor<String> {
    @!APILevel[
        since: "22"
    ]
    public static prop timeoutEach: KeyTimeoutEach
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyTimeoutHandler <: KeyFor<(TestCaseInfo) -> Unit> {
    @!APILevel[
        since: "22"
    ]
    public static prop timeoutHandler: KeyTimeoutHandler
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyCaptureOutput <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop captureOutput: KeyCaptureOutput
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyNoCaptureOutput <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop noCaptureOutput: KeyNoCaptureOutput
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyShowAllOutput <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop showAllOutput: KeyShowAllOutput
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyVerbose <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop verbose: KeyVerbose
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyMeasurement <: KeyFor<Measurement> {
    @!APILevel[
        since: "22"
    ]
    public static prop measurement: KeyMeasurement
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyMeasurementInfo <: KeyFor<MeasurementInfo> {
    @!APILevel[
        since: "22"
    ]
    public static prop measurementInfo: KeyMeasurementInfo
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyInternalTestrunnerInputPath <: KeyFor<String> {
    @!APILevel[
        since: "22"
    ]
    public static prop internalTestrunnerInputPath: KeyInternalTestrunnerInputPath
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyDeathAware <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop deathAware: KeyDeathAware
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyBaseline <: KeyFor<String> {
    @!APILevel[
        since: "22"
    ]
    public static prop baseline: KeyBaseline
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyFilter <: KeyFor<String> {
    @!APILevel[
        since: "22"
    ]
    public static prop filter: KeyFilter
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyIncludeTags <: KeyFor<String> {
    @!APILevel[
        since: "22"
    ]
    public static prop includeTags: KeyIncludeTags
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyExcludeTags <: KeyFor<String> {
    @!APILevel[
        since: "22"
    ]
    public static prop excludeTags: KeyExcludeTags
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyReportPath <: KeyFor<String> {
    @!APILevel[
        since: "22"
    ]
    public static prop reportPath: KeyReportPath
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyReportFormat <: KeyFor<String> {
    @!APILevel[
        since: "22"
    ]
    public static prop reportFormat: KeyReportFormat
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyBaselinePath <: KeyFor<String> {
    @!APILevel[
        since: "22"
    ]
    public static prop baselinePath: KeyBaselinePath
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyDryRun <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop dryRun: KeyDryRun
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public struct KeyShowTags <: KeyFor<Bool> {
    @!APILevel[
        since: "22"
    ]
    public static prop showTags: KeyShowTags
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}



@!APILevel[
    since: "22"
]
public class PowerAssertDiagramBuilder {
    @!APILevel[
        since: "22"
    ]
    public init(expression: String)
    
    /**
    * @throws NoneValueException
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func r<T>(value: T, exprAsText: String, position: Int64): T
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func r(value: Rune, exprAsText: String, position: Int64): Rune
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func r(value: String, exprAsText: String, position: Int64): String
    
    /**
    * @throws OutOfMemoryError
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws AssertIntermediateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func h(exception: Exception, exprAsText: String, position: Int64): Nothing
    
    /**
    * @throws IllegalSynchronizationStateException
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws AssertException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func w(passed: Bool): Unit
}
















@!APILevel[
    since: "22"
]
sealed interface Reporter<TReport, TReturn> {
}

@!APILevel[
    since: "22"
]
public class CsvReporter <: Reporter<BenchReport, Unit> {
    @!APILevel[
        since: "22"
    ]
    public CsvReporter(let directory: Path)
}

@!APILevel[
    since: "22"
]
public class CsvRawReporter <: Reporter<BenchReport, Unit> {
    @!APILevel[
        since: "22"
    ]
    public CsvRawReporter(let directory: Path)
}

@!APILevel[
    since: "22"
]
public class XmlReporter <: Reporter<TestReport, Unit> {
    @!APILevel[
        since: "22"
    ]
    public XmlReporter(let directory: Path)
}

@!APILevel[
    since: "22"
]
public class ConsoleReporter <: Reporter<TestReport, Unit> & Reporter<BenchReport, Unit> {
    @!APILevel[
        since: "22"
    ]
    public ConsoleReporter(let colored!: Bool = true)
}

@!APILevel[
    since: "22"
]
public class TextReporter<PP> <: Reporter<TestReport, PP> & Reporter<BenchReport, PP>
        where PP <: PrettyPrinter {
    @!APILevel[
        since: "22"
    ]
    public TextReporter(let into!: PP)
}

extend <PP> TextReporter<PP> <: TextReporterBase<PP> where PP <: PrettyPrinter {
    /**
    * @throws OverflowException
    * @throws FSException
    * @throws IllegalMemoryException
    * @throws ConcurrentModificationException
    * @throws RegexException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws UnittestOptionValidationException
    * @throws ArithmeticException
    * @throws OutOfMemoryError
    * @throws NoneValueException
    * @throws IllegalArgumentException
    * @throws InvalidDataException
    * @throws DataModelException
    * @throws JsonException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func printReport(report: Report): PP
}

extend ConsoleReporter <: TextReporterBase<Unit> {
    /**
    * @throws OverflowException
    * @throws FSException
    * @throws IllegalMemoryException
    * @throws ConcurrentModificationException
    * @throws RegexException
    * @throws IllegalStateException
    * @throws IndexOutOfBoundsException
    * @throws UnittestOptionValidationException
    * @throws ArithmeticException
    * @throws OutOfMemoryError
    * @throws NoneValueException
    * @throws IllegalArgumentException
    * @throws InvalidDataException
    * @throws DataModelException
    * @throws JsonException
    * @throws IllegalSynchronizationStateException
    * @throws getOrThrow
    * @throws UnittestCliOptionsFormatException
    * @throws ProcessException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func printReport(report: Report): Unit
}

@!APILevel[
    since: "22"
]
public class RawStatsReporter <: Reporter<BenchReport, HashMap<String, (Float64, Float64)>> {
    @!APILevel[
        since: "22"
    ]
    public RawStatsReporter()
}







extend LStep <: Serializable<LStep> {
    @!APILevel[
        since: "22"
    ]
    public func serializeInternal(): DataModel
    
    /**
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func deserialize(dm: DataModel): LStep
}

extend StepKind <: Serializable<StepKind> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func serializeInternal(): DataModel
    
    /**
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func deserialize(dm: DataModel): StepKind
}

extend StepInfo <: Serializable<StepInfo> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func serializeInternal(): DataModel
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws DataModelException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func deserialize(dm: DataModel): StepInfo
}



extend TestCaseReportInfo <: Serializable<TestCaseReportInfo> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func serializeInternal(): DataModel
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws DataModelException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func deserialize(dm: DataModel): TestCaseReportInfo
}


extend TestSuiteReportInfo <: Serializable<TestSuiteReportInfo> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func serializeInternal(): DataModel
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws DataModelException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func deserialize(dm: DataModel): TestSuiteReportInfo
}


extend RenderOptions <: Serializable<RenderOptions> {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func serializeInternal(): DataModel
    
    /**
    * @throws Exception
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws DataModelException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func deserialize(dm: DataModel): RenderOptions
}

extend Float64 <: AsFloat {
    @!APILevel[
        since: "22"
    ]
    public func asFloat(): Float64
}


@!APILevel[
    since: "22"
]
public class FlatMapProcessor<T, R> <: DataStrategyProcessor<R> {
}

@!APILevel[
    since: "22"
]
public class FlatMapStrategyProcessor<T, R> <: DataStrategyProcessor<R> {
}

@!APILevel[
    since: "22"
]
public class MapProcessor<T, R> <: DataStrategyProcessor<R> {
}

@!APILevel[
    since: "22"
]
public class CartesianProductProcessor<T0, T1> <: DataStrategyProcessor<(T0, T1)> {
    @!APILevel[
        since: "22"
    ]
    public CartesianProductProcessor(let left: DataStrategyProcessor<T0>, let right: DataStrategyProcessor<T1>)
}

@!APILevel[
    since: "22"
]
public class SimpleProcessor<T> <: DataStrategyProcessor<T> {
    @!APILevel[
        since: "22"
    ]
    public SimpleProcessor(let buildDelegate: () -> DataStrategy<T>, let name: String)
}

@!APILevel[
    since: "22"
]
public open class LazyCyclicNode {
}

@!APILevel[
    since: "22"
]
public class InputParameter {
}


@!APILevel[
    since: "22"
]
sealed abstract class DataStrategyProcessor<T> {
    @!APILevel[
        since: "22"
    ]
    public func intoBenchmark(
        caseName!: String,
        configuration!: Configuration,
        doRun!: (T, Int64, Int64) -> Float64
    ): Benchmark
    
    @!APILevel[
        since: "22"
    ]
    public func intoUnitTestCase(
        caseName!: String,
        configuration!: Configuration,
        doRun!: (T) -> Unit
    ): UnitTestCase
    
    @!APILevel[
        since: "22"
    ]
    public static func start(s: DataStrategy<T>, name: String): SimpleProcessor<T>
    
    /**
    * @throws UnittestOptionValidationException
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func start<U>(f: () -> DataStrategy<U>, name: String): DataStrategyProcessor<U>
        where U <: BenchInputProvider<T>
   
    
    @!APILevel[
        since: "22"
    ]
    public static func start(f: () -> DataStrategy<T>, name: String, x!: Int64 = 0): SimpleProcessor<T>
    
    @!APILevel[
        since: "22"
    ]
    public static func start(f: () -> DataStrategyProcessor<T>, _: String): DataStrategyProcessor<T>
    
    @!APILevel[
        since: "22"
    ]
    public static func start<U>(f: () -> DataStrategyProcessor<U>, _: String, x!: Int64 = 0): DataStrategyProcessor<U>
        where U <: BenchInputProvider<T>
   
}

extend<T> DataStrategyProcessor<T> {
    @!APILevel[
        since: "22"
    ]
    public func map<R>(f: (T) -> R): MapProcessor<T, R>
    
    @!APILevel[
        since: "22"
    ]
    public func mapWithConfig<R>(f: (T, Configuration) -> R): MapProcessor<T, R>
    
    @!APILevel[
        since: "22"
    ]
    public func flatMap<R>(f: (T) -> DataProvider<R>): FlatMapProcessor<T, R>
    
    @!APILevel[
        since: "22"
    ]
    public func flatMapStrategy<R>(f: (T) -> DataStrategy<R>): FlatMapStrategyProcessor<T, R>
    
    @!APILevel[
        since: "22"
    ]
    public func product<R>(p: DataStrategyProcessor<R>): CartesianProductProcessor<T, R>
    
    @!APILevel[
        since: "22"
    ]
    public func productWithUnit<P>(p: P): MapProcessor<(T, Unit), T> where P <: DataStrategyProcessor<Unit>
}



extend JsonValue <: IntoJson {
    @!APILevel[
        since: "22"
    ]
    public func json(): JsonValue
}

extend String <: IntoJson {
    @!APILevel[
        since: "22"
    ]
    public func json(): JsonValue
}

extend Int64 <: IntoJson {
    @!APILevel[
        since: "22"
    ]
    public func json(): JsonValue
}

extend<T> Option<T> <: IntoJson where T <: IntoJson {
    @!APILevel[
        since: "22"
    ]
    public func json(): JsonValue
}

extend<T> Array<T> <: IntoJson where T <: IntoJson {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func json(): JsonValue
}

extend<T> ArrayList<T> <: IntoJson where T <: IntoJson {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func json(): JsonValue
}








extend CheckResult <: PrettyPrintable {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func pprintWithFailedPrefix(pp: PrettyPrinter): PrettyPrinter
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func pprint(pp: PrettyPrinter): PrettyPrinter
}



@!APILevel[
    since: "22"
]
public open class UnittestException <: Exception {
}

@!APILevel[
    since: "22"
]
public class UnittestTimeoutException <: Exception {
}

@!APILevel[
    since: "22"
]
public class UnittestCliOptionsFormatException <: UnittestException {
}












